{% extends "base.html" %} {% block title %}创建优惠券{% end %}

{% block head %}

    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $(":input[type='text'],:input[type='password'],textarea").wijtextbox();
  
            $("#wijmo-button").button();
            
            $("#number").wijinputnumber(
		{
			type: 'numeric',
			minValue: 1,
			maxValue: 1000,
			decimalPlaces: 0,
			showSpinner: true
		});
            $("#amount").wijinputnumber(
		{
			type: 'currency',
			minValue: 1,
			maxValue: 100,
			decimalPlaces: 0,
			showSpinner: true
		});
            
            $("#valid-date").wijinputdate({
                        showTrigger: true,
			dateFormat:'yyyy/MM/dd'
            });

        });
    </script>

{% end %}


{% block content %}
    <form action="" method="post">
        <ul class="formdecorator">
             <li>
                <label for="name">优惠券名称</label>
                <input type="text" id="name" name="name" class="long"/>
            </li>
            <li>
                <label for="url">优惠券地址</label>
                <input type="text" id="url" name="url" class="long"/>
            </li>
            <li>
                <label for="amount">面额</label>
                <input type="text" id="amount" name="amount" value="10" />
            </li>
            <li>
                <label for="number">发放数量</label>
                <input type="text" id="number" name="number" value="100" />
            </li>
            <li>
                <label for="valid-date">截至日期</label>
                <input type="text" id="valid-date" name="valid-date" />
            </li>
            <li>
                <label for="desc">其他说明</label>
                <textarea id="desc" name="desc" rows="4" class="long"></textarea>
            </li>
            <li>
                <label></label>
                {{ xsrf_form_html() }}
                <button id="wijmo-button">创建</button>
            </li>
        </ul>
        
    </form>


{% end %}